﻿using Autofac;
using System;
using Autofac.Integration.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RM.Data;
using RM.Core;
using RM.Services;

namespace RM.Admin
{
    public class DependencyRegistrar:IDependencyRegistrar
    {
        public int Order 
        {
            get { return 0; }
        }

        public virtual void Register(ContainerBuilder builder,ITypeFinder typeFinder)
        {
            builder.RegisterGeneric(typeof(EfRespository<>)).As(typeof(IRespository<>));
            //builder.RegisterType<UnitOfWork>().As<IUnitOfWork>().SingleInstance();
            builder.RegisterType<RecordTimeService>().As<IRecordTimeService>().SingleInstance();
        }
    }
}
